package com.example.telesys.mapper;

import com.example.telesys.pojo.Customerorder;
import com.example.telesys.pojo.CustomerorderExample;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CustomerorderMapper {
    long countByExample(CustomerorderExample example);

    int deleteByExample(CustomerorderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Customerorder record);

    int insertSelective(Customerorder record);

    List<Customerorder> selectByExample(CustomerorderExample example);

    Customerorder selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Customerorder record, @Param("example") CustomerorderExample example);

    int updateByExample(@Param("record") Customerorder record, @Param("example") CustomerorderExample example);

    int updateByPrimaryKeySelective(Customerorder record);

    int updateByPrimaryKey(Customerorder record);

    @Select("select username,SUM(number) as number from customerorder group by username")
    List<Customerorder> selectCustomerAndNumber();
}